package com.yc.bbs.dao;

import com.yc.bbs.entity.Topic;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Many;
import org.apache.ibatis.annotations.Result;
import org.apache.ibatis.annotations.Results;
import org.apache.ibatis.annotations.Select;

import java.util.List;


/**
 * <p>
 * BBS论坛-帖子表-19 Mapper 接口
 * </p>
 *
 * @author ly
 * @since 2024-11-23
 */
public interface TopicMapper extends BaseMapper<Topic> {

    @Select("SELECT * FROM tbl_topic ORDER BY publishtime DESC LIMIT 5")
    List<Topic> selectLatestTopics();
}
